from pydantic import BaseModel
from datetime import datetime
from typing import Optional

class VideoBase(BaseModel):
    title: str

class VideoCreate(VideoBase):
    pass

class Video(VideoBase):
    id: int
    filename: str
    file_path: str
    file_size: int
    upload_time: datetime
    duration: Optional[int]

    class Config:
        orm_mode = True 